﻿@model LS.Models.CardManageModel

@{
    ViewBag.Title = "Create";
}
<link rel="stylesheet" href="~/Content/themes/base/jquery.ui.all.css" />
@*<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")" type="text/javascript"></script>*@


<h2>Create</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>MemberCard</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Card.SeiralNumber)
        </div>
        <div class="editor-field">
            @*@model.Card.SeiralNumber= ViewBag.NewSeiralNumber;*@
            @Html.EditorFor(model => model.Card.SeiralNumber)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ExpireDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ExpireDate)
            @Html.ValidationMessageFor(model => model.ExpireDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <p>
            <input type="submit" value="Create" class = "btn btn-primary"/>
            @Html.ActionLink("Cancel", "Index", null, new { @class="btn btn-inverse"})
        </p>
    </fieldset>
}

<div>
    
</div>

<script src="@Url.Content("~/Scripts/ui/jquery.ui.core.js")"></script>
<script src="@Url.Content("~/Scripts/ui/jquery.ui.widget.js")"></script>
<script src="@Url.Content("~/Scripts/ui/jquery.ui.datepicker.js")"></script>

<script type="text/javascript">
    $(function () {
        $("#ExpireDate").datepicker();
        $("#ExpireDate").datepicker("option", "dateFormat", "yy-mm-dd");
        var today = new Date();
        var defaultExpireDate = today.setFullYear(today.getFullYear() + 1);
        $('#ExpireDate').datepicker('setDate', today);
    });
</script>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")

}
